﻿<UserControl x:Class="SearchModule.Views.SearchInputView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:prism="clr-namespace:Microsoft.Practices.Prism.Commands;assembly=Microsoft.Practices.Prism"
             mc:Ignorable="d" 
             d:DesignHeight="20" d:DesignWidth="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
        </Grid.RowDefinitions>

        <TextBox Grid.Row="0" Grid.Column="0" x:Name="SearchInput"></TextBox>
        <Button Grid.Row="0" Grid.Column="1" x:Name="SearchButton"
                prism:Click.Command="{Binding Path=DataContext.SearchCommand, ElementName=SearchInput}"
                prism:Click.CommandParameter="{Binding Path=Text, ElementName=SearchInput}">
            <TextBlock>Go</TextBlock>
        </Button>
    </Grid>
</UserControl>
